<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sq="http://www.w3.org/1999/html">
<head>
  <th:block th:include="include :: header" />
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5 th:text="${title}"></h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="editFrom" method="post">
                        <div class="form-group">
                          <label class="col-sm-3 control-label">角色名称：</label>
                          <div class="col-sm-8">
                            <input type="hidden" id="id" name="id" th:value="${role.id}">
                            <input id="roleName" name="roleName" minlength="2" th:value="${role.roleName}"
                                   type="text" maxlength="50" class="form-control" required="" aria-required="true">
                          </div>
                        </div>
                        <div class="form-group">
                          <label class="col-sm-3 control-label">状态：</label>
                          <div class="col-sm-8">
                            <sq:select id="status" name="status" th:value="${role.status}" dicCode="1001"
                                       pleaseChoose="用户状态"></sq:select>
                          </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">备注：</label>
                            <div class="col-sm-8">
                                <textarea id="description" name="remark" maxlength="200" class="form-control" th:text="${role.remark}"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                          <div class="col-sm-4 col-sm-offset-3">
                            <button class="btn btn-primary" type="button" onclick="saveData()">
                              提交
                            </button>
                            <button class="btn btn-outline btn-default" type="button" onclick="back()">
                              返回
                            </button>
                          </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    const requestPath = parent.api.sys.role
</script>
</html>